package com.umeox.watch.moto.dataservice.db.model;

import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

@Entity(tableName = DeviceConfig.TABLE_NAME)
public class DeviceConfig {
    @Ignore
    public static final String TABLE_NAME = "device_config";

    @NonNull
    @PrimaryKey
    private String deviceId;
    /**
     * 设备状态，0：未激活, 1：已激活
     */

    private int activeStatus;
    /**
     * sim 卡类型 0:  normal ，1：v-sim， 2： e-sim
     */

    private int simType;
    /**
     * 是否合约机 false：否，true: 是
     */

    private boolean contractMachine;
    /**
     * 白名单开关 0：关，1：开
     */

    private int whiteList;
    /**
     * 脱落报警开关 0：关，1：开
     */

    private int offAlarm;
    /**
     * 情景模式
     * 0：标准 ，1：震动，2：静音
     */

    private int sceneMode;

    /**
     * 禁止关机开关
     * 0：允许关机
     * 1：禁止关机
     */

    private int forbiddenShutdown;
    /**
     * 禁止手表拨打视频电话
     * 0：允许，默认
     * 1：不允许
     */

    private int forbiddenVideoCall;
    /**
     * 标记Launcher应用是否已经启动
     * 0：未启动，默认
     * 1：已启动
     */

    private boolean launched;
    /**
     * 记录当前主题序号
     */

    private int theme;
    /**
     * 判断是否处于上课模式
     * 0 手表处于正常使用时段，1手表处于上课禁用模式
     */

    private boolean inForbidPeriodFlag;
    /**
     * 壁纸索引
     */
    private int wallpaper;
    /**
     * 用户自定义的壁纸路径
     */
    private String customWallpaper;
    /**
     * 距离单位
     */
    @Ignore
    private int distanceUnit;
    /**
     * 自动接听开关
     * 0：手动接听
     * 1：自动接听
     */
    private int autoAnswer;
    /**
     * 报告通话位置开关 0：关，1：开
     */
    public int reportCallLocation;
    /**
     * 关机报告位置开关 0：关，1：开
     */
    public int reportShutdownLocation;


    /**
     * 设置时区:America/Chihuahua(GMT-06:00) 数据为空时,自动更换时区打开
     */
    private String timeZone;

    /**
     * 定位方法 0：服务端定位，1：设备端高德定位
     */
    private int locMethod = 1;

    /**
     * 群聊设置
     * 0：关，1：开(建群以及邀请和被邀请)
     */
    public int customGroup = 0;

    /**
     * AI开关
     * 0：关，1：开
     */
    public int qimi;

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public boolean isLaunched() {
        return launched;
    }

    public void setLaunched(boolean launched) {
        this.launched = launched;
    }

    public boolean isInForbidPeriodFlag() {
        return inForbidPeriodFlag;
    }

    public void setInForbidPeriodFlag(boolean inForbidPeriodFlag) {
        this.inForbidPeriodFlag = inForbidPeriodFlag;
    }

    public int getTheme() {
        return theme;
    }

    public void setTheme(int theme) {
        this.theme = theme;
    }


    public String getTimeZone() {
        return timeZone;
    }

    public void setTimeZone(String timeZone) {
        this.timeZone = timeZone;
    }

    public int getWallpaper() {
        return wallpaper;
    }

    public void setWallpaper(int wallpaper) {
        this.wallpaper = wallpaper;
    }

    public int getDistanceUnit() {
        return distanceUnit;
    }

    public void setDistanceUnit(int distanceUnit) {
        this.distanceUnit = distanceUnit;
    }


    public int getActiveStatus() {
        return activeStatus;
    }

    public void setActiveStatus(int activeStatus) {
        this.activeStatus = activeStatus;
    }

    public int getSimType() {
        return simType;
    }

    public void setSimType(int simType) {
        this.simType = simType;
    }

    public boolean isContractMachine() {
        return contractMachine;
    }

    public void setContractMachine(boolean contractMachine) {
        this.contractMachine = contractMachine;
    }

    public int getWhiteList() {
        return whiteList;
    }

    public void setWhiteList(int whiteList) {
        this.whiteList = whiteList;
    }

    public int getOffAlarm() {
        return offAlarm;
    }

    public void setOffAlarm(int offAlarm) {
        this.offAlarm = offAlarm;
    }

    public int getSceneMode() {
        return sceneMode;
    }

    public void setSceneMode(int sceneMode) {
        this.sceneMode = sceneMode;
    }

    public int getForbiddenShutdown() {
        return forbiddenShutdown;
    }

    public int getForbiddenVideoCall() {
        return forbiddenVideoCall;
    }

    public void setForbiddenShutdown(int forbiddenShutdown) {
        this.forbiddenShutdown = forbiddenShutdown;
    }


    public void setForbiddenVideoCall(int forbiddenVideoCall) {
        this.forbiddenVideoCall = forbiddenVideoCall;
    }

    public int getAutoAnswer() {
        return autoAnswer;
    }

    public void setAutoAnswer(int autoAnswer) {
        this.autoAnswer = autoAnswer;
    }

    public int getLocMethod() {
        return locMethod;
    }

    public void setLocMethod(int locMethod) {
        this.locMethod = locMethod;
    }

    public String getCustomWallpaper() {
        return customWallpaper;
    }

    public void setCustomWallpaper(String customWallpaper) {
        this.customWallpaper = customWallpaper;
    }

    public int getReportCallLocation() {
        return reportCallLocation;
    }

    public void setReportCallLocation(int reportCallLocation) {
        this.reportCallLocation = reportCallLocation;
    }

    public int getReportShutdownLocation() {
        return reportShutdownLocation;
    }

    public void setReportShutdownLocation(int reportShutdownLocation) {
        this.reportShutdownLocation = reportShutdownLocation;
    }

    public boolean isActivated() {
        return activeStatus == 1;
    }

    public int getCustomGroup() {
        return customGroup;
    }

    public void setCustomGroup(int customGroup) {
        this.customGroup = customGroup;
    }

    public int getQimi() {
        return qimi;
    }

    public void setQimi(int qimi) {
        this.qimi = qimi;
    }

    @Override
    public String toString() {
        return "DeviceConfig{" +
                "deviceId='" + deviceId + '\'' +
                ", activeStatus=" + activeStatus +
                ", simType=" + simType +
                ", contractMachine=" + contractMachine +
                ", whiteList=" + whiteList +
                ", offAlarm=" + offAlarm +
                ", sceneMode=" + sceneMode +
                ", forbiddenShutdown=" + forbiddenShutdown +
                ", forbiddenVideoCall=" + forbiddenVideoCall +
                ", launched=" + launched +
                ", theme=" + theme +
                ", inForbidPeriodFlag=" + inForbidPeriodFlag +
                ", wallpaper=" + wallpaper +
                ", customWallpaper='" + customWallpaper + '\'' +
                ", distanceUnit=" + distanceUnit +
                ", autoAnswer=" + autoAnswer +
                ", reportCallLocation=" + reportCallLocation +
                ", reportShutdownLocation=" + reportShutdownLocation +
                ", timeZone='" + timeZone + '\'' +
                ", locMethod=" + locMethod +
                ", customGroup=" + customGroup +
                ", qimi=" + qimi +
                '}';
    }
}
